<template>
  <button
    @click="onClick"
  >
    子组件
  </button>
</template>

<script setup lang="ts" name="Child">
  import { defineProps } from 'vue'
  const { onChildClick } = defineProps<{
    onChildClick: (msg: string) => void
  }>()
  const onClick = () => {
    onChildClick('在子组件点击')
  }
</script>

<style>
</style>